<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>管理员查看教师申请</title>
    <th:block th:insert="~{/head :: head}"></th:block>
</head>
<body>
<!-- Start: Header -->
<div th:insert="~{header::header}"></div>
<!-- End: Header -->

<!-- Start: Main -->
<div id="main">
    <!-- Start: Sidebar -->
    <div th:insert="~{admin/left::aside}"></div>
    <!-- End: Sidebar -->
    <!-- Start: Content -->
    <section id="content">
        <div id="topbar" class="affix">
            <ol class="breadcrumb">
                <li> <a href="#" th:href="@{/admin/teacher_all}" class="btn btn-default btn-gradient dropdown-toggle">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                </a></li>
                <li class="active">教师申请列表</li>
            </ol>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-md-10 col-lg-11 center-column">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>申请ID</th>
                            <th>教师ID</th>
                            <th>申请操作</th>
                            <th>申请状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="request : ${requests}">
                            <td th:text="${request.requestId}"></td>
                            <td th:text="${request.teacherId}"></td>
                            <td th:text="${request.requestContent}"></td>
                            <td>
                                <span th:text="${request.requestStatus}"></span>
                            </td>
                            <td>
                                <!-- 审批按钮 -->
                                <form th:action="@{/admin/approveRequest/{requestId}(requestId=${request.requestId})}" method="post">
                                    <button type="submit" class="btn btn-success" >批准</button>
                                </form>
                                <form th:action="@{/admin/rejectRequest/{requestId}(requestId=${request.requestId})}" method="post">
                                    <button type="submit" class="btn btn-danger" >拒绝</button>
                                </form>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </section>

</div>
</body>
</html>